package realQuestion.baidu;

import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i]=scanner.nextInt();
        }
        find(a,k);
    }
    public  static void find(int[] a,int k){
//        int length = a.length;
//        for (int i = 0; i <=length-k ; i++) {
//            int part=a[i];
//            int lo=i+1;
//            int hi=length-1;
//            int swap1=0,swap2=0;
//            while (lo<=hi){
//                if (lo-i+1==k){
//                    System.out.println("YES");
////                    System.out.print(swap1+"");
//                    if (swap1==0&&swap2==0){
//                        System.out.println(0);
//                    }else {
//                        //TODO:2023/9/12 这里可能会有问题 顺序上
//                        System.out.print(swap1+""+swap2);
//                    }
//                    break;
//                }
//                while (a[lo]>part&&lo-i+1<=k){
//                    lo++;
//                }
//                while (a[hi]<part&&hi){
//                    hi--;
//                }
//
        int start=-1;
        int end=-1;
        for (int i = 0; i <=a.length-k ; i++) {
            boolean  isValid=true;

            for (int j = i+1; j <i+k ; j++) {
                if (a[j]<a[j-1]){
                    isValid=false;
                break;
            }
        }
            if (isValid){
                start=i;
                end=i+k-1;
                break;
            }
            }
        if (start==-1){
            System.out.println("NO");
        }else {
            int swap1=-1;
            int swap2=-1;

            if (start>0&&a[start-1]>a[end]){
                swap1=start-1;
                swap2=end;
            }
            if (end<a.length-1&&a[start]>a[end+1]){
                swap1=start;
                swap2=end+1;
            }
            if (swap1==-1){
                System.out.println("YES");
                System.out.println(0);
            }else {
                System.out.println("YES");
                System.out.print(swap1+""+swap2);
            }
        }





}


}
